package calvin.study.springboot.config.aop;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.EnableAspectJAutoProxy;

//开启基于注解的aop模式
@EnableAspectJAutoProxy
@Configuration
//扫描该包下含有注解的类并注入到容器中
//@ComponentScan(basePackages="calvin.study.springboot.aop") 
public class MainConfigAop {
	
	@Bean
	public MathCalculator calculator() {
		return new MathCalculator();
	}

	@Bean
	public LogAspects logAspects() {
		return new LogAspects();
	}

}
